val select2 jquery

67

Select options of Select2 control based on values using Jquery -

$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed

Comments

Submit
0 Comments